 /**
 * 逻辑、功能相关描述: <br>
 *
 * @author 付湘辉  <br>
 * 编写日期：2009-1-13  <br>
 */
package com.ce.pms.occupation.service;

import org.junit.Test;
import org.springframework.util.Assert;

import com.ce.pms.DBUnitTool;
import com.ce.pms.common.model.SysrefcodeDO;
import com.ce.pms.custservice.service.IDFormManageService;
import com.ce.pms.occupation.vo.IdentityValidateVO;
import com.ce.pms.occupation.vo.OccupationChargeVO;

/**
 * 	名称: com.ce.pms.occupation.service.OccupationChargeServiceImplT <br>
 *  入伙预缴费服务实现类单元测试
 *
 * @author  付湘辉  <br>
 * Created on： 2009-1-13 <br>
 * @author <br>
 * update on： <br>
 * why: <br>
 */
public class OccupationChargeServiceImplT extends DBUnitTool {
	private static IOccupationChargeService occupationChargeService;
	
	/**
	 * 功能描述:  <br>
	 *
	 * Create author:付湘辉 <br>
	 * Create on:2009-1-13  <br>
	 * Edit author:  <br>
	 * Edit on:    <br>
	 * Why:     <br>
	 */
	@Test
	public void testAddOccupationCharge() {
		try {
			initOccupationChargeService();
			//正常业务
			IdentityValidateVO identityValidateVO = new  IdentityValidateVO(identityValidateId,
																															houseId,
																															SysrefcodeDO.OCCUPATION_NOTIN_MANAGEHOUSE);
			OccupationChargeVO occupationCharge = new OccupationChargeVO(identityValidateVO,creator);
			occupationCharge  = occupationChargeService.addOccupationCharge(occupationCharge);
			Assert.notNull(occupationCharge.getKeyword());
			//传入不合法参数
		} catch (Exception e) {
			super.dealException(e);
		}
	}
	/**
	 * 创建者ID
	 */
	private static Long creator = 1l;
	
	private static Long identityValidateId = 10004l;
	
	private static Long houseId = 9l;
	
	private void initOccupationChargeService(){
		if (occupationChargeService == null) {
			occupationChargeService = (IOccupationChargeService)applicationContext.getBean("occupationChargeService");
		}
	}
}
